<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>console.log</title>
</head>
<body>
    <script>
    function Console() {
      this.log = function(inText) {
        alert(inText);
        document.write(inText);
      }
    }
    window.console = new Console();
    console.log('hello');
    </script>

</body>
</html>
